<?php
/**
 * <类描述>
 * @author chenjunliang@star-net.cn
 * @copyright  ktvme. All Rights Reserved.
 * @version $Id: PHPMailerException.php 3 2017-05-08 03:02:47Z chendanming $
 */

namespace email;


use think\Exception;
use think\Log;

class PHPMailerException extends Exception{

    public function __construct($exceptions)
    {
        if ($exceptions) {
            Log::record('exceptions：' . json_encode($exceptions,JSON_UNESCAPED_UNICODE),'swoole');
            Log::save();
            exception($exceptions, 100006);
        }
    }

    public function errorMessage()
    {
        $errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
        return $errorMsg;
    }
}